<?php $__env->startSection('css'); ?>
    <link rel="stylesheet" href="/vendor/daterangepicker/daterangepicker.css">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">编辑套餐</strong> /
                <small>Create</small>
            </div>
        </div>
        <hr>
        <?php echo $__env->make('admin._flash', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-12">

                <form class="am-form" action="/admin/pack/<?php echo e($pack->id); ?>" method="post">
                    <?php echo e(csrf_field()); ?>

                    <?php echo e(method_field('PUT')); ?>




                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            套餐名称
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <input type="text" class="am-input-sm"value="<?php echo e($pack->name); ?>" name="name">
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">*请填写唯一项目名称</div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            项目所属分类
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <select data-am-selected="{btnWidth: '100%',  btnStyle: 'secondary', btnSize: 'sm', maxHeight: 360, searchBox: 1}"
                                    name="pcates_id">
                                <?php $__currentLoopData = $cates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($c->id); ?>"  <?php if($c->id==$pack->pcates_id): ?>selected <?php endif; ?>>
                                <?php echo e($c->name); ?>

                                </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            缩略图
                        </div>

                        <div class="am-u-sm-8 am-u-md-8 am-u-end col-end">
                            <div class="am-form-group am-form-file new_thumb">
                                <button type="button" class="am-btn am-btn-success am-btn-sm">
                                    <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                                </button>
                                <input type="file" id="image_upload">
                                <input type="hidden" name="image" value="<?php echo e($pack->image); ?>">
                            </div>

                            <hr data-am-widget="divider" style="" class="am-divider am-divider-dashed"/>

                            <div>
                                <img src="<?php echo e($pack->image); ?>" id="img_show" style="max-height: 200px;" >
                            </div>
                        </div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            固定搭配名称
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <input type="text" class="am-input-sm" name="fixed_name"  value="<?php echo e($pack->fixed_name); ?>">
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">*请填写套餐固定搭配</div>
                    </div>
                    <div class="am-g am-margin-top sort">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            固定搭配价格
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <input type="text" name="fixed_price" class="am-input-sm" value="<?php echo e($pack->fixed_price); ?>">
                        </div>
                    </div>
                    <div class="am-g am-margin-top sort">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            排序
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <input type="text" name="sort" class="am-input-sm" value="<?php echo e($pack->sort); ?>">
                        </div>
                    </div>
                    <div class="am-g am-margin-top sort">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            套餐原价
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <input type="text" name="original" class="am-input-sm" value="<?php echo e($pack->original); ?>">
                        </div>
                    </div>
                    <div class="am-g am-margin-top sort">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            套餐优惠价
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <input type="text" name="special" class="am-input-sm" value="<?php echo e($pack->special); ?>">
                        </div>
                    </div>
                    <div class="am-g am-margin-top sort">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            是否上架
                        </div>
                        <label class="am-btn am-btn-default am-btn-xs am-round">
                            <input type="checkbox" name="is_use" value="1"    <?php if($pack->is_use == 1): ?>checked <?php endif; ?> > 是
                        </label>
                        <label class="am-btn am-btn-default am-btn-xs am-round">
                            <input type="checkbox" name="is_use" value="0" <?php if($pack->is_use == 0): ?>checked <?php endif; ?>  >否
                        </label>
                    </div>

                    <div class="am-margin">
                        <button type="submit" class="am-btn am-btn-primary am-radius">提交保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script src="/vendor/html5-fileupload/jquery.html5-fileupload.js"></script>
    <script src="/js/upload.js"></script>



    <script>
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin.application', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>